import Vue from "vue";
import VueRouter from "vue-router";
import coupon from "../components/coupon.vue"
import sum from '../components/sumdetail.vue'     //总金额详情和优惠券详情
import sing from '../components/singledetails.vue' //列表的单项详情，需要组件传至子页面通过参数渲染

Vue.use(VueRouter);

const routes = [
	{
		path: "/",
		name: "coupon",
		component: coupon
	},
	{
		path: "/sum/:id",
		name: "sum",
		component: sum
	},
	{
		path: "/sing",
		name: "sing",
		component: sing
	}
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;